THEORETICAL PEARL Computational monads and subtyping
نویسندگان
چکیده
Subtyping is an important concept and used in many programming languages. One approach to give semantics to languages with subtypes is by translation to target languages without subtyping: Subtypings A ≤ B are interpreted via conversion functions A → B. This paper shows how to extend the method to languages with computational effects, using Moggi’s computational metalanguage.
منابع مشابه
The Category Theoretic Understanding of Universal Algebra: Lawvere Theories and Monads
Lawvere theories and monads have been the two main category theoretic formulations of universal algebra, Lawvere theories arising in 1963 and the connection with monads being established a few years later. Monads, although mathematically the less direct and less malleable formulation, rapidly gained precedence. A generation later, the definition of monad began to appear extensively in theoretic...
متن کاملMonadic Type Systems: Pure Type Systems for Impure Settings
Pure type systems and computational monads are two parameterized frameworks that have proved to be quite useful in both theoretical and practical applications. We join the foundational concepts of both of these to obtain monadic type systems. Essentially, monadic type systems inherit the parameterized higher-order type structure of pure type systems and the monadic term and type structure used ...
متن کاملThe Arrow Calculus (Functional Pearl)
We introduce the arrow calculus, a metalanguage for manipulating Hughes’s arrows with close relations both toMoggi’s metalanguage for monads and to Paterson’s arrow notation.
متن کاملCapturing the Future by Replaying the Past
Delimited continuations are the mother of all monads! So goes the slogan inspired by Filinski’s 1994 paper, which showed that delimited continuations can implement any monadic e ect, letting the programmer use an e ect as easily as if it was built into the language. It’s a shame that not many languages have delimited continuations. Luckily, exceptions and state are also the mother of all monads...
متن کاملLeibniz’s Monads and Mulla Sadra’s Hierarchy of Being: A Comparative Study
Mulla Sadra and Leibniz, the two philosophers from the East and the West, belong to two different worlds. Though they were unaware of the ideas of each other, their philosophical systems share certain common points that are comparable. Monads constitute the basis of Leibniz's thought and he refers to their features in his various works. On the other side, Mulla Sadra's philosophy is also based ...
متن کامل